package com.dsy.xiangcun_index.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsy.tools.common.utils.QueryObj;
import com.dsy.tools.entity.TbPhoto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author dsy
 * @since 2021-03-08
 */
@Component
public interface TbPhotoMapper extends BaseMapper<TbPhoto> {
    IPage<TbPhoto> getAllPhoto(Page<TbPhoto> page, @Param("we") QueryWrapper<QueryObj> wrapper);


    TbPhoto getPhotoById(Integer photoId);

    List<TbPhoto> getPhotos();

    List<TbPhoto> getIndexMapList();

    List<TbPhoto> getIndexPhotoList();

    void updateLikeById(@Param("photoId")Integer photoId);
}
